<?php
	$raiz = $_SERVER['DOCUMENT_ROOT'];

	include($raiz . '/connections/banco.inc');
	include($raiz . '/classes/Tabela.inc');
	
	$objTabela = new Tabela();
	
//	$objTabela->setNomeTabela($_POST['tabela']);
	$objTabela->setNomeTabela('Carro');
	
    /*Listando os campos da tabela*/
	$campos = mysql_query("SHOW FULL FIELDS FROM " . $objTabela->getNomeTabela());
    while($row = mysql_fetch_array($campos))
    {
        $objTabela->addCampo   ( $row["Field"]   );     /*Nome do campo*/
        $objTabela->addTipo    ( $row["Type"]    );     /*Tipo do campo*/
        $objTabela->addNull    ( $row["Null"]    );     /*Aceita Null*/
        $objTabela->addKey     ( $row["Key"]     );     /*Tipo de chave*/
        $objTabela->addDefault ( $row["Default"] );     /*default*/
        $objTabela->addExtra   ( $row["Extra"]   );     /*auto_increment*/
    }
   
?>